﻿<Page
	  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
	  xmlns:v="clr-namespace:MovieRental_Presentation.Validation"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
	  xmlns:local="clr-namespace:MovieRental_Presentation" x:Name="newCustomerPage"
	  x:Class="MovieRental_Presentation.NewCustomerDialog" 
      d:DesignWidth="900" d:DesignHeight="500"
      mc:Ignorable="d"
      WindowTitle="Movie Rental"
	  MinWidth="900"
	  MinHeight="500" 
      ShowsNavigationUI="False">

	<Grid x:Name="LayoutRoot" Background="{StaticResource backgroundBrush}">
		<Border BorderBrush="{StaticResource borderBrush}" BorderThickness="{StaticResource borderThickness}" Margin="8" Padding="{StaticResource borderPadding}" CornerRadius="{StaticResource borderCornerRadius}">
			<Grid Margin="0">
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto" MinHeight="108.57"/>
					<RowDefinition/>
				</Grid.RowDefinitions>
				<TextBlock Margin="8,8,0,0" TextWrapping="Wrap" Text="New Customer" FontSize="{StaticResource dialogGiantTitleTextSize}" HorizontalAlignment="Left" VerticalAlignment="Top" Foreground="{StaticResource borderBrush}"/>
				<Button x:Name="backButton" Content="Back" HorizontalAlignment="Right" Width="60" VerticalAlignment="Center" Height="60" Margin="0,0,8,0" Click="backButton_Click"/>
				<Border BorderBrush="{StaticResource borderBrush}" BorderThickness="{StaticResource borderThickness}" Height="3" VerticalAlignment="Bottom"/>
				<Grid Grid.Row="1">
					<Grid.RowDefinitions>
						<RowDefinition Height="*"/>
						<RowDefinition Height="*"/>
						<RowDefinition Height="*"/>
						<RowDefinition Height="*"/>
						<RowDefinition Height="*"/>
					</Grid.RowDefinitions>
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="250"/>
						<ColumnDefinition/>
					</Grid.ColumnDefinitions>
					<TextBlock Margin="8,0,0,0" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="{StaticResource inputBoxBrush}" FontSize="{StaticResource dialogElementFontSize}" Text="First Name"/>
					<TextBlock Margin="8,0,0,0" TextWrapping="Wrap" Text="Last Name" HorizontalAlignment="Left" Foreground="{StaticResource inputBoxBrush}" FontSize="{StaticResource dialogElementFontSize}" Grid.Row="1" d:LayoutOverrides="Height" VerticalAlignment="Center"/>
					<TextBlock Margin="8,0,0,0" TextWrapping="Wrap" Text="Email" HorizontalAlignment="Left" Foreground="{StaticResource inputBoxBrush}" FontSize="{StaticResource dialogElementFontSize}" Grid.Row="2" d:LayoutOverrides="Height" VerticalAlignment="Center"/>
					<TextBlock Margin="8,0,0,0" TextWrapping="Wrap" Text="Phone No" HorizontalAlignment="Left" Foreground="{StaticResource inputBoxBrush}" FontSize="{StaticResource dialogElementFontSize}" Grid.Row="3" d:LayoutOverrides="Height" VerticalAlignment="Center"/>
					<TextBox x:Name="firstNameTextBox" Grid.Row="0" Grid.Column="1" Margin="0,0,8,0" VerticalAlignment="Center" Style="{StaticResource HugeInputTextBoxStyle}">
						<TextBox.Text>
							<Binding Path="FirstName" Mode="TwoWay">
								<Binding.ValidationRules>
									<v:RequiredValidationRule ValidatesOnTargetUpdated="True"/>
								</Binding.ValidationRules>
							</Binding>
						</TextBox.Text>
					</TextBox>
					<TextBox x:Name="lastNameTextBox" Grid.Row="1" Grid.Column="1"  Margin="0,0,8,0"  VerticalAlignment="Center" Style="{StaticResource HugeInputTextBoxStyle}">
						<TextBox.Text>
							<Binding Path="LastName" Mode="TwoWay">
								<Binding.ValidationRules>
									<v:RequiredValidationRule ValidatesOnTargetUpdated="True"/>
								</Binding.ValidationRules>
							</Binding>
						</TextBox.Text>
					</TextBox>
					<TextBox x:Name="emailTextBox" Grid.Row="2" Grid.Column="1" Margin="0,0,8,0" VerticalAlignment="Center" Style="{StaticResource HugeInputTextBoxStyle}">
						<TextBox.Text>
							<Binding Path="Email" Mode="TwoWay">
								<Binding.ValidationRules>
									<v:EmailValidationRule ValidatesOnTargetUpdated="True"/>
								</Binding.ValidationRules>
							</Binding>
						</TextBox.Text>
					</TextBox>
					<TextBox x:Name="phoneNoTextBox" Grid.Row="3" Grid.Column="1" Margin="0,0,8,0" VerticalAlignment="Center" Style="{StaticResource HugeInputTextBoxStyle}">
						<TextBox.Text>
							<Binding Path="PhoneNo" Mode="TwoWay">
								<Binding.ValidationRules>
									<v:PhoneNoValidationRule ValidatesOnTargetUpdated="True"/>
								</Binding.ValidationRules>
							</Binding>
						</TextBox.Text>
					</TextBox>
                    <Button x:Name="okButton" Content="Ok" Grid.Column="1" Margin="0,0,8,0" Grid.Row="4" HorizontalAlignment="Right" VerticalAlignment="Center" Width="200" Height="40" Click="okButton_Click" IsDefault="True"/>
                </Grid>
			</Grid>
		</Border>
	</Grid>
</Page>